From 8582f80391ec2b416790682ddbf6e165f9cf5c54 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 18 Apr 2017 14:22:23 +0100 Subject: [PATCH] build: Add the appropriate paths in the configuration header Instead of injecting them into the C compiler arguments. --- config.h.meson | 2 ++ gtk/meson.build | 9 ++++----- meson.build | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config.h.meson b/config.h.meson index 158907f98f..b1f286b9b5 100644 --- a/config.h.meson +++ b/config.h.meson @@ -277,6 +277,8 @@ /* Define to 1 if linux/memfd.h exists */ #mesondefine HAVE_LINUX_MEMFD_H +#mesondefine GTK_SYSCONFDIR + #mesondefine GTK_LOCALEDIR #mesondefine GTK_DATADIR diff --git a/gtk/meson.build b/gtk/meson.build index 14c181b4a1..54fe86a205 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -756,17 +756,16 @@ gtkversion = configure_file( input : 'gtkversion.h.in', output : 'gtkversion.h', configuration: gtkversion_cdata, - install_dir: 'include/gtk-4.0/gtk/' + install_dir: 'include/gtk-4.0/gtk' ) gtk_cargs = [ '-DGTK_COMPILATION', '-DG_LOG_DOMAIN="Gtk"', '-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED', - '-DGTK_BINARY_VERSION="' + gtk_binary_version + '"', - '-DGTK_HOST="' + host_machine.system() + '"', - '-DGTK_SYSCONFDIR="' + get_option('sysconfdir') + '"', - '-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"', + '-DGTK_BINARY_VERSION="@0@"'.format(gtk_binary_version), + '-DGTK_HOST="@0@"'.format(host_machine.system()), + '-DGTK_DATA_PREFIX="@0@"'.format(gtk_prefix), ] gtk_gen_headers = [gtkmarshal_h, gtktypebuiltins_h, gtkprivatetypebuiltins_h, gtkversion] diff --git a/meson.build b/meson.build index 9633d02c91..fef52f2ca2 100644 --- a/meson.build +++ b/meson.build @@ -81,6 +81,7 @@ gtk_prefix = get_option('prefix') gtk_libdir = join_paths(gtk_prefix, get_option('libdir')) gtk_datadir = join_paths(gtk_prefix, get_option('datadir')) gtk_localedir = join_paths(gtk_prefix, get_option('localedir')) +gtk_sysconfdir = join_paths(gtk_prefix, get_option('sysconfdir')) cc = meson.get_compiler('c') @@ -89,6 +90,7 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version()) cdata.set_quoted('GTK_LOCALEDIR', gtk_localedir) cdata.set_quoted('GTK_DATADIR', gtk_datadir) cdata.set_quoted('GTK_LIBDIR', gtk_libdir) +cdata.set_quoted('GTK_SYSCONFDIR', gtk_sysconfdir) cdata.set_quoted('GETTEXT_PACKAGE', 'gtk40') cdata.set('GTK_MAJOR_VERSION', gtk_major_version) cdata.set('GTK_MINOR_VERSION', gtk_minor_version) -- 2.30.2